翻訳と辞書
Words near each other
・ Stathmopoda trichrysa
・ Stathmopodidae
・ Stathmopolitis
・ Stathmostelma
・ Statholdergaarden
・ Stati di immaginazione
・ Static
・ Static & Silence
・ Static (2012 film)
・ Static (Bleach album)
・ Static (Cults album)
・ Static (DC Comics)
・ Static (Eclipse Comics)
・ Static (film)
・ Static (Huntress album)
Static (keyword)
・ Static (Mr. Big album)
・ Static (Planet Funk album)
・ Static (song)
・ Static (The Twilight Zone)
・ Static Age
・ Static Age (disambiguation)
・ Static Airplane Jive
・ Static analysis
・ Static Anonymity
・ Static apnea
・ Static bar
・ Static battle
・ Static Blue
・ Static build


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Static (keyword) : ウィキペディア英語版
Static (keyword)

In the C programming language (and its close descendants such as C++ and Objective-C), static is a reserved word controlling both lifetime (as a static variable) and visibility (depending on ''linkage''). The word static is also used in languages influenced by C, such as Java.
In C, static is a ''storage class'' (not to be confused with classes in object-oriented programming), as are extern, auto and register (which are also reserved words). Every variable and function has one of these storage classes; if a declaration does not specify the storage class, a context-dependent default is used:, extern for all top-level declarations in a source file; auto for variables declared in function bodies.
In these languages, the term "static variable" has two meanings which are easy to confuse:
# A variable with the same lifetime as the program, as described above (language-independent); ''or''
# (C-family-specific) A variable declared with storage class static.
Variables with storage class extern, which include variables declared at top level without an explicit storage class, are static in the first meaning but not the second.
==Other uses==
As well as specifying static lifetime, declaring a variable as static can have other effects depending on where the declaration occurs:
;: A variable declared as static at the top level of a source file (outside any function definitions) is only visible throughout that file ("file scope", also known as "internal linkage").
;Static local variables: Variables declared as static inside a function are statically allocated, thus keep their memory cell throughout all program execution, while having the same scope of visibility as automatic local variables (auto and register), meaning remain local to the function. Hence whatever values the function puts into its static local variables during one call will still be present when the function is called again.
;Static member variables: In C++, member variables declared as static inside class definitions are class variables (shared between all class instances, as opposed to instance variables).

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Static (keyword)」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.